Skip to content

Fix/merge regression 2026 01 26#4

Merged
gamesguru merged 6 commits into
mainfrom
fix/merge-regression_2026-01-26
Jan 26, 2026
Merged

Fix/merge regression 2026 01 26#4
gamesguru merged 6 commits into
mainfrom
fix/merge-regression_2026-01-26

Conversation

@gamesguru

@gamesguru gamesguru commented Jan 26, 2026

Copy link
Copy Markdown
Member

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

Summary by cubic

Fixes a regression that caused 500s on malformed URIs and tidies error messages and docs around remote functions. Also bumps Kit to 2.50.1-tg.1.

  • Bug Fixes

    • Handle decode_pathname errors in respond.js and return 400 instead of 500.
    • Fix missing backtick in form.buttonProps removal error message (server and client).
    • Improve grammar and header naming in adapter-node handler errors.
    • Fix internal import path in form-utils to use @tg-svelte/kit.
  • Documentation

    • Add missing imports and correct .remote filename usage in remote functions examples.
    • Clarify integrations wording to “Svelte 4 or earlier” for script preprocessing.

Written for commit 8ad2999. Summary will update on new commits.

- Fix missing imports and filename conventions in remote functions documentation
- Safely handle `decode_pathname` in `respond.js` to avoid 500 errors on malformed URIs
- Fix missing backtick in `form.buttonProps` removal error message
- Clarify Svelte version wording in integrations documentation
- Fix grammar and consistency in `adapter-node` handler
Copilot AI review requested due to automatic review settings January 26, 2026 11:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes several regressions and issues including a critical URI decoding bug, grammatical errors in error messages, and documentation improvements.

Changes:

  • Adds proper error handling for malformed pathnames to prevent crashes when decoding the original URL path
  • Fixes missing closing backticks in error messages for deprecated form.buttonProps
  • Corrects grammatical errors in adapter-node error messages
  • Improves documentation clarity and fixes import paths in examples

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/kit/src/version.js Version bump to 2.50.1-tg.1
packages/kit/package.json Version bump to 2.50.1-tg.1
packages/kit/src/runtime/server/respond.js Adds try-catch for decoding original pathname to prevent crashes on malformed URIs
packages/kit/src/runtime/client/remote-functions/form.svelte.js Fixes missing closing backtick in deprecated buttonProps error message
packages/kit/src/runtime/app/server/remote/form.js Fixes missing closing backtick in deprecated buttonProps error message
packages/adapter-node/src/handler.js Corrects grammar in error messages ("an invalid" → "invalid", "headers" → "header")
documentation/docs/60-appendix/20-integrations.md Improves clarity by changing "before Svelte 5" to "uses Svelte 4 or earlier"
documentation/docs/20-core-concepts/60-remote-functions.md Adds missing import statement and fixes import path, but has critical placement issue with script tag

Comment on lines 409 to +415
<form {...survey}>
<h2>Which operating system do you use?</h2>

+++ <script>
import { operatingSystems, languages, survey } from './data.remote';
</script>+++

Copilot AI Jan 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script tag is incorrectly placed inside the form element. In Svelte components, the script tag must be at the top of the component file, before any markup. It should be placed before the opening form tag on line 409, not after the h2 element on line 410.

Suggested change
<form {...survey}>
<h2>Which operating system do you use?</h2>
+++ <script>
import { operatingSystems, languages, survey } from './data.remote';
</script>+++
+++ <script>
import { operatingSystems, languages, survey } from './data.remote';
</script>+++
<form {...survey}>
<h2>Which operating system do you use?</h2>

Copilot uses AI. Check for mistakes.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 8 files

Confidence score: 4/5

  • This PR looks safe to merge overall; the main issue is limited to a documentation example rather than core logic.
  • In documentation/docs/20-core-concepts/60-remote-functions.md, the <script> block is placed inside markup, which can cause a Svelte compilation error for readers following the example.
  • Pay close attention to documentation/docs/20-core-concepts/60-remote-functions.md - move the <script> block to top-level to avoid Svelte compile errors.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="documentation/docs/20-core-concepts/60-remote-functions.md">

<violation number="1" location="documentation/docs/20-core-concepts/60-remote-functions.md:412">
P2: Move the `<script>` block to the top level of the example. Imports inside markup will cause a Svelte compilation error.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

<form {...survey}>
<h2>Which operating system do you use?</h2>

+++ <script>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Move the <script> block to the top level of the example. Imports inside markup will cause a Svelte compilation error.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At documentation/docs/20-core-concepts/60-remote-functions.md, line 412:

<comment>Move the `<script>` block to the top level of the example. Imports inside markup will cause a Svelte compilation error.</comment>

<file context>
@@ -409,6 +409,10 @@ export const survey = form(
 <form {...survey}>
 	<h2>Which operating system do you use?</h2>
 
++++	<script>
+		import { operatingSystems, languages, survey } from './data.remote';
+	</script>+++
</file context>

- Fix internal import path in form-utils.js (@sveltejs/kit -> @tg-svelte/kit)
- Update pnpm-lock.yaml with fixed dependencies
@gamesguru gamesguru merged commit 8ad2999 into main Jan 26, 2026
25 checks passed
@gamesguru gamesguru deleted the fix/merge-regression_2026-01-26 branch January 26, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants